Optimal. Leaf size=63 \[ -\frac {1}{3} \sqrt {3+2 \sqrt {3}} \tan ^{-1}\left (\frac {\left (x+\sqrt {3}+1\right )^2}{\sqrt {3 \left (3+2 \sqrt {3}\right )} \sqrt {x^4-4 \sqrt {3} x^2-4}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.050, Rules used = {1740, 203} \[ -\frac {1}{3} \sqrt {3+2 \sqrt {3}} \tan ^{-1}\left (\frac {\left (x+\sqrt {3}+1\right )^2}{\sqrt {3 \left (3+2 \sqrt {3}\right )} \sqrt {x^4-4 \sqrt {3} x^2-4}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 1740
Rubi steps
\begin {align*} \int \frac {1+\sqrt {3}+x}{\left (1-\sqrt {3}+x\right ) \sqrt {-4-4 \sqrt {3} x^2+x^4}} \, dx &=-\left (\left (4 \left (2+\sqrt {3}\right )\right ) \operatorname {Subst}\left (\int \frac {1}{6 \left (1-\sqrt {3}\right ) \left (1+\sqrt {3}\right )^3+3 \left (1+\sqrt {3}\right )^4+4 x^2} \, dx,x,\frac {\left (1+\sqrt {3}+x\right )^2}{\sqrt {-4-4 \sqrt {3} x^2+x^4}}\right )\right )\\ &=-\frac {1}{3} \sqrt {3+2 \sqrt {3}} \tan ^{-1}\left (\frac {\left (1+\sqrt {3}+x\right )^2}{\sqrt {3 \left (3+2 \sqrt {3}\right )} \sqrt {-4-4 \sqrt {3} x^2+x^4}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 7.83, size = 876, normalized size = 13.90 \[ -\frac {\sqrt {2} \sqrt {\frac {\sqrt {3}-1-\frac {4}{-x+\sqrt {3}+1}}{-3+\sqrt {3}-i \sqrt {4-2 \sqrt {3}}}} \left (-x+\sqrt {3}+1\right )^2 \left (\left (\frac {2 \left (2 i \sqrt {3} \sqrt {i \left (\sqrt {3}+1-\frac {8}{-x+\sqrt {3}+1}\right )+\sqrt {4-2 \sqrt {3}}}+\sqrt {6} \sqrt {2 \sqrt {4-2 \sqrt {3}}-\sqrt {12-6 \sqrt {3}}+i \sqrt {3}-i+\frac {8 i \left (-2+\sqrt {3}\right )}{-x+\sqrt {3}+1}}+\sqrt {-\frac {2 i \left (\left (-1+\sqrt {3}\right ) x-8 \sqrt {3}+14\right )}{-x+\sqrt {3}+1}+4 \sqrt {4-2 \sqrt {3}}-2 \sqrt {12-6 \sqrt {3}}}\right )}{x-\sqrt {3}-1}+i \sqrt {3} \sqrt {i \left (\sqrt {3}+1-\frac {8}{-x+\sqrt {3}+1}\right )+\sqrt {4-2 \sqrt {3}}}+i \sqrt {i \left (\sqrt {3}+1-\frac {8}{-x+\sqrt {3}+1}\right )+\sqrt {4-2 \sqrt {3}}}+\sqrt {-\frac {2 i \left (\left (-1+\sqrt {3}\right ) x-8 \sqrt {3}+14\right )}{-x+\sqrt {3}+1}+4 \sqrt {4-2 \sqrt {3}}-2 \sqrt {12-6 \sqrt {3}}}\right ) F\left (\sin ^{-1}\left (\frac {\sqrt {\sqrt {4-2 \sqrt {3}}-i \left (\sqrt {3}+1-\frac {8}{-x+\sqrt {3}+1}\right )}}{2^{3/4} \sqrt [4]{2-\sqrt {3}}}\right )|\frac {2 \sqrt {4-2 \sqrt {3}}}{\sqrt {4-2 \sqrt {3}}+i \left (-3+\sqrt {3}\right )}\right )+2 \sqrt {6} \sqrt {\sqrt {4-2 \sqrt {3}}-i \left (\sqrt {3}+1-\frac {8}{-x+\sqrt {3}+1}\right )} \sqrt {\frac {x^2-2 \sqrt {3}+4}{\left (-x+\sqrt {3}+1\right )^2}} \Pi \left (\frac {2 \sqrt {4-2 \sqrt {3}}}{\sqrt {4-2 \sqrt {3}}-i \left (-3+\sqrt {3}\right )};\sin ^{-1}\left (\frac {\sqrt {\sqrt {4-2 \sqrt {3}}-i \left (\sqrt {3}+1-\frac {8}{-x+\sqrt {3}+1}\right )}}{2^{3/4} \sqrt [4]{2-\sqrt {3}}}\right )|\frac {2 \sqrt {4-2 \sqrt {3}}}{\sqrt {4-2 \sqrt {3}}+i \left (-3+\sqrt {3}\right )}\right )\right )}{\left (\sqrt {4-2 \sqrt {3}}-i \left (-3+\sqrt {3}\right )\right ) \sqrt {\sqrt {4-2 \sqrt {3}}-i \left (\sqrt {3}+1-\frac {8}{-x+\sqrt {3}+1}\right )} \sqrt {x^4-4 \sqrt {3} x^2-4}} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 1.27, size = 112, normalized size = 1.78 \[ \frac {1}{6} \, \sqrt {2 \, \sqrt {3} + 3} \arctan \left (-\frac {{\left (9 \, x^{4} - 30 \, x^{3} + 18 \, x^{2} - 2 \, \sqrt {3} {\left (2 \, x^{4} - 10 \, x^{3} + 3 \, x^{2} - 10 \, x + 2\right )} + 24\right )} \sqrt {x^{4} - 4 \, \sqrt {3} x^{2} - 4} \sqrt {2 \, \sqrt {3} + 3}}{11 \, x^{6} - 42 \, x^{5} + 66 \, x^{4} - 176 \, x^{3} - 132 \, x^{2} - 168 \, x - 88}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x + \sqrt {3} + 1}{\sqrt {x^{4} - 4 \, \sqrt {3} x^{2} - 4} {\left (x - \sqrt {3} + 1\right )}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.16, size = 311, normalized size = 4.94 \[ \frac {\sqrt {-\left (-1-\frac {\sqrt {3}}{2}\right ) x^{2}+1}\, \sqrt {-\left (-\frac {\sqrt {3}}{2}+1\right ) x^{2}+1}\, \EllipticF \left (\left (\frac {i}{2}+\frac {i \sqrt {3}}{2}\right ) x , i \sqrt {1-4 \sqrt {3}\, \left (-\frac {\sqrt {3}}{2}+1\right )}\right )}{\left (\frac {i}{2}+\frac {i \sqrt {3}}{2}\right ) \sqrt {x^{4}-4 \sqrt {3}\, x^{2}-4}}+2 \sqrt {3}\, \left (-\frac {\sqrt {-\left (-1-\frac {\sqrt {3}}{2}\right ) x^{2}+1}\, \sqrt {-\left (-\frac {\sqrt {3}}{2}+1\right ) x^{2}+1}\, \EllipticPi \left (\sqrt {-1-\frac {\sqrt {3}}{2}}\, x , \frac {1}{\left (-1-\frac {\sqrt {3}}{2}\right ) \left (\sqrt {3}-1\right )^{2}}, \frac {\sqrt {-\frac {\sqrt {3}}{2}+1}}{\sqrt {-1-\frac {\sqrt {3}}{2}}}\right )}{\sqrt {-1-\frac {\sqrt {3}}{2}}\, \left (\sqrt {3}-1\right ) \sqrt {x^{4}-4 \sqrt {3}\, x^{2}-4}}-\frac {\arctanh \left (\frac {-4 \sqrt {3}\, x^{2}+2 \left (\sqrt {3}-1\right )^{2} x^{2}-4 \sqrt {3}\, \left (\sqrt {3}-1\right )^{2}-8}{2 \sqrt {\left (\sqrt {3}-1\right )^{4}-4 \sqrt {3}\, \left (\sqrt {3}-1\right )^{2}-4}\, \sqrt {x^{4}-4 \sqrt {3}\, x^{2}-4}}\right )}{2 \sqrt {\left (\sqrt {3}-1\right )^{4}-4 \sqrt {3}\, \left (\sqrt {3}-1\right )^{2}-4}}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x + \sqrt {3} + 1}{\sqrt {x^{4} - 4 \, \sqrt {3} x^{2} - 4} {\left (x - \sqrt {3} + 1\right )}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {x+\sqrt {3}+1}{\sqrt {x^4-4\,\sqrt {3}\,x^2-4}\,\left (x-\sqrt {3}+1\right )} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {x + 1 + \sqrt {3}}{\left (x - \sqrt {3} + 1\right ) \sqrt {x^{4} - 4 \sqrt {3} x^{2} - 4}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________